package com.joney.mq;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.core.JmsMessagingTemplate;

import javax.jms.Queue;

@SpringBootApplication
public class MqApplication {

	public static void main(String[] args) {
		SpringApplication.run(MqApplication.class, args);
	}


	//@Bean
	//public Queue queue(){
	//	return new ActiveMQQueue("wxc_test");
	//}

	//@Bean
	//public ActiveMQConnectionFactory connectionFactory() {
//此链接信息可放入配置文件中
	//	return new ActiveMQConnectionFactory("admin", "admin", "tcp://192.168.12.26:61616");
	//}

	//@Bean
	//public JmsMessagingTemplate jmsMessagingTemplate(ActiveMQConnectionFactory connectionFactory){
	//	System.out.println("get JmsMessagingTemplate");
	//	return new JmsMessagingTemplate(connectionFactory);
	//}

}
